package tech.dnf.tripartite.nnfpjss.service.codec;


import lombok.extern.slf4j.Slf4j;
import sun.reflect.generics.reflectiveObjects.NotImplementedException;
import tech.dnf.tripartite.nnfpjss.bean.dto.Request;
import tech.dnf.tripartite.nnfpjss.bean.vo.Response;
import tech.dnf.tripartite.nnfpjss.plugin.*;
import tech.dnf.tripartite.nnfpjss.service.invoice.NNFPInvoiceService;

import java.util.Properties;

@Slf4j
@Intercepts(@Signature(type = NNFPInvoiceService.class, method = "execute", args = Request.class))
public class ResponseEncryptPlugin implements Interceptor {


    public Object intercept(Invocation invocation){
        Response result = (Response) invocation.proceed();
        return null;
    }

    public Object plugin(Object target) {
        if (target instanceof NNFPInvoiceService) {
            return Plugin.wrap(target, this);
        }
        return target;
    }

    public void setProperties(Properties properties) {
        throw new NotImplementedException();
    }
}
